import { postJson, postParams, getParams } from '/@/utils/request';
export interface UserLoginParams {
  phMail: string;
  password: string;
  areaCode: string;
}
export interface sendMailsParams {
  mailbox: string;
  type: string;
}
/**
 * 发送邮件
 * @param params
 * @returns
 */
export const sendMails = (params: any) => postParams('/data/sms/sendMails', params);
/**
 * 发送短信
 * @param params
 * @returns
 */
export const sendSms = (params: any) => postParams('/data/sms/sendSmsNew', params);
/**
 * 账号登录
 * @param params
 * @returns
 */
export const userLogin = (params: any) => postParams('/member/member/login', params);
/**
 * 账号注册
 * @param params
 * @returns
 */
export const userRegister = (params: any) => postJson('/member/member/register', params);
/**
 * 交易数据列表
 * @param params
 * @returns
 */
export const queryTradeList = (params: any) => getParams(`/data/data/queryTradeList`, params);
/**
 * 获取公告列表
 * @param params
 * @returns
 */
export const getNotices = (params: any) => getParams(`/data/data/getNotices`, params);
/**
 * 获取最新价
 * @param params
 * @returns
 */
export const getTickerPrice = (params: any) => getParams(`/data/data/tickerPrice`, params);
/**
 * 查询加密货币K线
 * @param params
 * @returns
 */
export const getTokensKLine = (params: any) => getParams(`/data/data/queryTokensKLine`, params);

/**
 * 查询期货k线
 * @param params
 * @returns
 */
export const getFuturesKLine = (params: any) => getParams(`/data/data/queryFuturesKLine`, params);
/**
 * 查询开盘价
 * @param params
 * @returns
 */
export const queryOpenPrice = (params: any) => getParams(`/data/data/queryOpenPrice`, params);
/**
 * 忘记密码
 * @param params
 * @returns
 */
export const forgetPassword = (params: any) => postParams('/member/member/forgetPass', params);

/**
 * banner
 * @param params
 * @returns
 */
export const getBanners = (params: any) => getParams('/data/data/getBanners', params);
/**
 * cionQuotation
 * @param params
 * @returns
 */
export const getCionQuotation = (params: any) => getParams('/data/data/getCionQuotation', params);
/**
 * currencyList
 * @returns
 */
export const getCurrencyList = (params?: any) => getParams('/data/data/getCurrencyList', params);
/**
 * marketChart
 * @returns
 */
export const getMarketChart = (params: any) => getParams('/data/data/market/chart', params);
/**
 * 充值接口
 * @param params
 * @returns
 */
export const rechargeCurrency = (params: any) =>
  postParams('/member/balance/rechargeCurrency', params);
/**
 * 获取个人详情信息
 * @param params
 * @returns
 */
export const getUserInfo = (params: any) => getParams('/member/member/getMember', params);

/**
 * 获取个人详情信息
 * @param params
 * @returns
 */
export const getContactLink = (params: any) => getParams('/member/member/getContactLink', params);
/**
 * 获取秒合约交割时间配置
 * @param params
 * @returns
 */
export const getSecondscontract = (params: any) =>
  getParams('/contract/contract/getSecondsContract', params);

/**
 * 绑定银行卡
 * @param params
 * @returns
 */
export const setBankInfo = (params: any) => postParams('/member/member/setBankInfo', params);

/**
 * 获取秒合约记录
 * @param params
 * @returns
 */
export const getSecondContractRecord = (params: any) =>
  getParams('/contract/contract/getSecondContractRecord', params);
/**
 * 充值记录
 * @param params
 * @returns
 */
export const getRechargerecording = (params: any) =>
  getParams('/member/balance/rechargeCurrencyRecord', params);
/**
 * 设置支付密码
 * @param params
 * @returns
 */
export const setPayPass = (params: any) => postParams('/member/member/setPayPass', params);
/**
 * 提现
 * @param params
 * @returns
 */
export const extractCoin = (params: any) => postParams('/member/balance/extractCoin', params);
/**
 * 充值记录
 * @param params
 * @returns
 */
export const getWithdrawrecording = (params: any) =>
  getParams('/member/balance/withdraw_recording', params);

/**
 * 查询资产
 * @param params
 * @returns
 */
export const getBalances = (params: any) => getParams('/member/balance/getBalances', params);

/**
 * @param params
 * @returns
 */
export const resetPassword = (params: any) => postParams('/member/member/resetPassword', params);
/**
 * 重置支付密码
 * @param params
 * @returns
 */
export const resetPayPass = (params: any) => postParams('/member/member/resetPayPass', params);
/**
 * 查询所有货币
 * @param params
 * @returns
 */
export const getAllCurrencyList = (params: any) =>
  getParams('/data/data/getAllCurrencyList', params);

/**
 * 退出登录
 * @param params
 * @returns
 */
export const loginOut = (params: any) => getParams('/member/member/loginOut', params);
/**
 * 汇报交叉汇率列表
 * @param params
 * @returns
 */
export const getCurrencyCrossList = (params: any) =>
  getParams('/data/data/currencyCrossList', params);
/*
 * 退出登录
 * @param params
 * @returns
 */
export const getTodayProfit = (params: any) =>
  getParams('/contract/contract/getTodayProfit', params);
/**
 * 秒合约下注
 * @param params
 * @returns
 */
export const secondContractBetting = (params: any) =>
  postJson('/contract/contract/secondContractBetting', params);

/**
 * 验证用户验证码
 * @param params
 * @returns
 */
export const checkSmsCode = (params: any) => postParams('/member/member/checkSmsCode', params);
/**
 * 订单倒计时
 * @param params
 * @returns
 */
export const getOrderTimeOut = (params: any) =>
  getParams('/contract/contract/orderTimeOut', params);

/**
 * 秒合约下单重试
 * @param params
 * @returns
 */
export const secondContractBettingRetry = (params: any) =>
  postJson('/contract/contract/secondContractBettingRetry', params);

/**
 * kyc 认证
 * @param params
 * @returns
 */
export const setAuthen = (params: any) => postParams('/member/member/setAuthen', params);
/**
 * 加密货币列表
 * @param params
 * @returns
 */
export const getQueryTokens = (params: any) => getParams('/data/data/queryTokens', params);
/**
 * 期货列表
 * @param params
 * @returns
 */
export const getQueryCarbonTrading = (params: any) =>
  getParams('/data/data/queryCarbonTrading', params);
/**
 * 新闻详情
 * @param params
 * @returns
 */
export const getNoticesOne = (id: any, params: any) =>
  getParams(`/data/data/getNoticesOne/${id}`, params);
/**
 * 获取第三方配置信息
 * @param params
 * @returns
 */
export const queryConfig = (params: any) => getParams('/data/data/queryConfig', params);

/**
 * 抢红包
 * @param params
 * @returns
 */
export const RedPacketGrabPacket = (params: any) =>
  postJson('/member/redPacket/grabPacket', params);

/**
 * 红包记录
 * @param params
 * @returns
 */
export const getRedPacketHistory = (params: any) => getParams('/member/redPacket/history', params);

/**
 * 任务列表
 * @param params
 * @returns
 */
export const queryTaskList = (params: any) => getParams('/member/taskReward/queryTaskList', params);

/**
 * 领取奖励
 * @param params
 * @returns
 */
export const receiveBonus = (params: any) => postJson('/member/taskReward/receiveBonus', params);

/**
 * 分销统计
 * @param params
 * @returns
 */
export const distributionCount = (params: any) => getParams('/member/distribution/count', params);

/**
 * 分销列表
 * @param params
 * @returns
 */
export const distributionLevelList = (params: any) =>
  getParams('/member/distribution/levelList', params);
/**
 * 收益信息
 * @param params
 * @returns
 */
export const getDistributionInfo = (params: any) => getParams('/member/distribution/info', params);
/**
 * 收益记录
 * @param params
 * @returns
 */
export const getDistributionPage = (params: any) => getParams('/member/distribution/page', params);

/**
 * 查询首页视频
 * @param params
 * @returns
 */
export const contentSettingsList = (params: any) =>
  getParams('/member/contentSettings/list', params);
/**
 * 查询新手指导列表
 * @param params
 * @returns
 */
export const queryNewbieGuideTitleList = (params: any) =>
  getParams('/data/data/queryNewbieGuideTitleList', params);

/**
 * 新手指导列表详情
 * @param params
 * @returns
 */
export const queryNewbieGuideTitleDetail = (id: any) =>
  getParams(`/data/data/queryNewbieGuide/${id}`);
